import { loginResult } from "../types/user";
import RequestHttp from "../utils/request";

// 封装API
// 获取验证码
export const sendCodeAPI = (params: { mobile: string }) => RequestHttp.get<null>(`/v1_0/sms/codes/${params.mobile}`, params)
// 登录
export const loginAPI = (data: {mobile: string, code: string}) => RequestHttp.post<loginResult>('/v1_0/authorizations', data)